function out = get_terrain(varargin)

steps = .3*(1:6);
% fh = @(x) -.01 * (...
%     heaviside(x - steps(1)) + ...
%     heaviside(x - steps(2)) + ...
%     heaviside(x - steps(3)) + ...
%     heaviside(x - steps(4)) - ...
%     heaviside(x - steps(5)) - ...
%     heaviside(x - steps(6)));

% fh = @(x) -.03*x;

% fh = @(x) .03 * sin(x) + .006*cos(8*x).^2 + .010*sin((x+pi/3)*4) + ...
%     .003*cos(27*x).^2;

fh = @(x) 0*x;

if nargin == 0
    out = fh;
elseif nargin == 1
    out = fh(varargin{1});
end

%xbnd = [-1 5];
%dt = 1e-3;
%x = xbnd(1):dt:xbnd(2);
%y = fh(x) - fh(0);
%y_int = fh(0);

%h = figure(1);
%set(h, ...
%    'NumberTitle', 'off', ...
%    'Name', 'Pseudorandom Terrain Generator');
%clf;
%hold on;
%patch(...
%    [-.5 x 3.25], ... x
%    [-.1 y-y_int -.1], ... y
%    0, ... color data
%    'EdgeColor', 'None', ... no lines
%    'FaceColor', [108 52 28]/255); % brown
%plot(cf);
%hold off;
%set(gca, ...
%    'XLim', [-.5 3.25], ...
%    'YLim', [-0.1, .7]);